<#assign channelId = 2 />
<#assign pageTitle = "${pageTitle}-${siteCompany.siteName!}" />
<#assign pageHeader>
	<script type="text/javascript">
		var categoryId = ${params.categoryId!};
		var teacherId = ${params.teacherId!};
		var memberTypeId = ${params.memberTypeId!};
		var orderBy = ${params.orderBy!};
		var isFree = ${params.isFree!};
		var isLiving = ${params.isLiving!};
		var sellType = "${params.sellType!}";
		var currentPage = ${page.currentPage};
		var totalPage = ${totalPages};
	</script>
</#assign>
<#assign pageContent>
	<div class="body-wrap">
		<div class="type-box white-bg">
			<div class="content-wrap">
				<#if categoryRoots?? && categoryRoots?size gt 0>
					<div class="clearfix">
						<span>专业：</span>
						<ul class="fl">
							<a title="不限" href="/course/list.html">
								<li <#if params.categoryId==0>class="active"</#if>>不限</li>
							</a>
							<#list categoryRoots as category>
								<a  title="${category.categoryName}" href="/course/list.html?categoryId=${category.categoryId}">
									<li <#if categoryRootId==category.categoryId>class="active"</#if>>${category.categoryName}</li>
								</a>
							</#list>
						</ul>
					</div>
				</#if>
				<#if categoryChildren?? && categoryChildren?size gt 0>
					<div class="clearfix">
						<span>分类：</span>
						<ul class="fl">
							<a title="不限" href="/course/list.html?categoryId=${categoryRootId!}">
								<li <#if params.categoryId==0>class="active"</#if>>不限</li>
							</a>
							<#list categoryChildren as child>
								<a title="${child.categoryName}" href="/course/list.html?categoryId=${child.categoryId}">
									<li <#if categoryParentId==child.categoryId>class="active"</#if>>${child.categoryName}</li>
								</a>
							</#list>
						</ul>
					</div>
				</#if>
			</div>
		</div>
		<div class="filter-box white-bg mb-20">
			<div class="content-wrap">
				<div class="fl">
					<span class="item <#if params.orderBy == 0>active</#if>" onclick="setOrderBy(0)">综合</span>
					<span class="division">|</span>
					<span class="item <#if params.orderBy == 1>active</#if>"  onclick="setOrderBy(1)">热门</span>
					<span class="division">|</span>
					<span class="item <#if params.orderBy == 2>active</#if>"  onclick="setOrderBy(2)">销量</span>
				</div>
				<div class="fr">
					<div class="layui-form">
						<label for="isFree">
							<input type="checkbox" onclick="setIsFree()" id="isFree" value="1" title="免费" lay-skin="primary" <#if params.isFree gt 0 >checked</#if>>
						</label>
					</div>
				</div>
			</div>
		</div>
		<div class="content-wrap">
			<div class="course-list">
				<#if courseList?? && courseList?size gt 0>
					<#list courseList as course>
						<div class="list-items">
							<div class="list-item">
								<div class="list-content">
									<a href="/course/view/${course.courseId}.html" target="_blank" class="list-course-title">${course.courseName}</a>
									<a href="/course/view/${course.courseId}.html" target="_blank" class="list-course-img">
										<img lay-src="${course.cover!''}" alt="">
										<div class="hover-img"><span class="layui-icon layui-icon-play"></span></div>
									</a>
									<div class="list-course-info"><span>${course.intro!}</span></div>
									<div class="list-course-level level-hot">
										<#if course.price gt 0>
											<span class="price">￥${course.price/100} 元</span>
										<#else>
											<span class="price">免费</span>
										</#if>
										<#if course.sourcePrice gt 0>
											<del>原价${course.sourcePrice/100} 元</del>
										</#if>
									</div>
									<div class="list-course-type">${course.categoryName!}</div>
								</div>
							</div>
						</div>
					</#list>
				</#if>
			</div>
		</div>
		<!--分页 s-->
		<div id="showPage" class="page-box content-wrap"></div>
		<!--分页 e-->
	</div>
</#assign>
<#assign pageFooter>
	<script type="text/javascript" src="/static/js/page.js"></script>
	<script type="text/javascript" src="/static/js/course/course-list.js"></script>
</#assign>
<#include "../layouts/layout.ftl">